<script>
  {
    class A {
      hasSuper() {
        return super
      }
    }
    console.assert(new A().hasSuper() === false)
  }

  {
    class A {
      hasSuper() {
        return true
      }
    }
    class B extends A {
      hasSuper() {
        return super.hasSuper
      }
    }
    console.assert(new B().hasSuper() === true)
  }
  {
    class A {
      hasSuper() {
        return true
      }
    }
    class B extends A {
      hasSuper() {
        return 'nothing'
      }
    }
    console.assert(new B().hasSuper() === void 0)
  }

  {
    class A {
      iAmSuper() {
        return true
      }
    }
    class B extends A {}
    class C extends B {
      iAmSuper() {
        return iAmSuper()
      }
    }
    console.assert(new C().iAmSuper() === true)
  }
  {
    class A {}
    class B extends A {
      getMethod() {
        return super.constructor
      }
    }
    console.assert(new B().getMethod() === void 0)
  }

  {
    class A {
      constructor() {
        this.levels = 1
      }
    }
    class B {
      constructor() {
        this.levels++
      }
    }
    console.assert(new B().levels === 2)
  }

  {
    class A {
      constructor(startValue = 1, addTo = 1) {
        this.counter = startValue + addTo
      }
    }
    class B extends A {
      constructor(...args) {
        super()
        this.counter++
      }
    }
    console.assert(new B(42, 2).counter === 45)
  }

  {
    class A {
      inc() {
        this.countUp = 1
      }
    }
    class B extends A {
      inc() {
        super.inc()
        this.countUp = 2

        return this.countUp
      }
    }
    console.assert(new B().inc() === 1)
  }

  {
    class ParentClassA {
      constructor() {
        return 'parent'
      }
    }
    class B extends ParentClassA {
      constructor() {
        super()
        this.isTop = '' + super.konstructer
      }
    }
    console.assert(new B().isTop.includes('ParentClassA'))
  }
</script>
